import cgi
import datetime
import urllib
import webapp2

import jinja2
import os
import datetime

import json

dir = os.path.dirname(__file__)
filename = os.path.join(dir, '../view')
jinja_environment = jinja2.Environment(loader=jinja2.FileSystemLoader(filename))

from google.appengine.ext import db

from model.Person import Person
from model.User import User

class AddUser(webapp2.RequestHandler):

    def post(self):
        fb_uid = int(self.request.get('fb_uid'))
        seeking = str(self.request.get('seeking'))
        birthday = str(self.request.get('birthday'))

        u1 = User(fb_uid=fb_uid, searching=seeking, fb_birthdate = datetime.date(year=1986, month=3, day=5))
        u1.put()

        p1 = Person(fb_uid=fb_uid, gender='male', searching=seeking)
        p1.put()

        self.redirect('/list')